import { baseRequest } from '@/utils/request'

const request = (url, ...arg) => baseRequest(`/biz/lecture/` + url, ...arg)

/**
 * 开课Api接口管理器
 *
 * @author ahui
 * @date  2023/05/13 21:21
 **/
export default {
	// 获取开课分页
	eduLecturePage(data) {
		return request('page', data, 'get')
	},
	// 获取开课列表
	eduLectureList(data) {
		return request('list', data, 'get')
	},
	// 提交开课表单 edit为true时为编辑，默认为新增
	eduLectureSubmitForm(data, edit = false) {
		return request(edit ? 'add' : 'edit', data)
	},
	// 删除开课
	eduLectureDelete(data) {
		return request('delete', data)
	},
	// 创建开课
	eduLectureCreate(data) {
		return request('create', data, 'get')
	},
	// 合班开课
	eduLectureMerge(data) {
		return request('merge', data, 'get')
	},
	// 获取开课详情
	eduLectureDetail(data) {
		return request('detail', data, 'get')
	},
	// 统计课时
	eduLectureCalculate(data) {
		return request('calculate', data, 'get')
	},
	eduLectureSmartExport(data) {
		return request('smartExport', data, 'get')
	},
	eduTeacherList(data) {
		return request('teacherList', data, 'get')
	},
	eduCourseList(data) {
		return request('courseList', data, 'get')
	}
}
